package com.prinxchengshan.reportbase.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.prinxchengshan.reportbase.pojo.CreditExceeding;
import com.prinxchengshan.reportbase.pojo.NewCreditinputHk;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.ArrayList;
import java.util.List;

@Mapper
public interface NewCreditInputHkMapper extends BaseMapper<NewCreditinputHk> {

    @Select("select * from V_SAPcreditout")
    @Results({
            @Result(column = "CO", property = "creditNo"),
            @Result(column = "总额", property = "totalAmount"),
            @Result(column = "未还金额", property = "unpaidAmount"),
            @Result(column = "信用开始日期", property = "creditStartDate"),
            @Result(column = "信用结束日期", property = "creditEndDate"),
            @Result(column = "是否统计", property = "isCounted")
    }) // 指定返回结果的类型
    ArrayList<NewCreditinputHk> getCrmCreditList();

}
